package cn.tedu.profiles.controller;

import cn.tedu.common.vo.JsonResult;
import cn.tedu.poresonnel.pojo.vo.PoresonnelVO;
import cn.tedu.profiles.pojo.param.ProfilesParam;
import cn.tedu.profiles.pojo.vo.ProfilesVO;
import cn.tedu.profiles.service.ProfilesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/profiles")
@Api(tags = "搜收栏")
public class ProfilesController {
    @Autowired
     ProfilesService profilesService;

    @GetMapping("/profiles/queries")
    @ApiOperation(value = "搜收框")
    public JsonResult queryprofiles(ProfilesParam profilesParam){
        log.debug("搜收框，id={},password={}",profilesParam);
        List<ProfilesVO> list = profilesService.queryprofiles(profilesParam);
        return JsonResult.ok(list);
    }
}
